#!/bin/bash
###########static area###########
install_path="${HOME}/zxhtom"
###########static area###########
# current path
DIR=$( dirname "$(readlink -f  ${BASH_SOURCE[0]})" )
if [ ! -d $install_path ]
then
  mkdir -p $install_path
fi
file_name=`ls ${DIR} | grep "wso2ei.*zip" | head -n 1 | awk '{print $NF}'`
folder_name=`echo ${file_name%.zip}`
unzip -o -d ${install_path} ${DIR}/${file_name}
cp -rvf ${DIR}/lib ${install_path}/${folder_name}/
cp ${DIR}/restart.sh ${install_path}/${folder_name}/
sh ${install_path}/${folder_name}/restart.sh 

